using System;
using System.Collections.Generic;
using System.Text;

namespace Dogfight2008
{
  public class Uniform
  {
    public readonly double Value;
    public Uniform(double value)
    {
      if (value < 0 || value > 1)
        throw new Exception("Expected uniform value, got " + value.ToString());
      Value = value;
    }

    public override bool Equals(object obj)
    {
      Uniform rhs = obj as Uniform;
      if (rhs == null)
        return false;

      return Value == rhs.Value;
    }

    public override int GetHashCode()
    {
      return Value.GetHashCode();
    }

    public override string ToString()
    {
      return Value.ToString();
    }
  }
}
